﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HelloWindsor
{
    public partial class Form1 : Form
    {
        private HttpServiceWatcher ServiceWatcher { get; set; }

        public Form1()
        {
            InitializeComponent();
        }
        public Form1(HttpServiceWatcher watcher) : this()
        {
            ServiceWatcher = watcher;
        }

        private void btStartWatching_Click(object sender, EventArgs e)
        {
            ServiceWatcher.StartWatching();
            lbStatus.Text = ServiceWatcher.Status;
        }

        private void btStopWatching_Click(object sender, EventArgs e)
        {
            ServiceWatcher.StopWatching();
            lbStatus.Text = ServiceWatcher.Status;
        }

       

        
    }
}
